﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site_Admin.master" AutoEventWireup="true" CodeFile="Timkiemlop.aspx.cs" Inherits="Admin_Timkiemlop" %>

<%@ Register src="../Controls/admin/ucMenu_l.ascx" tagname="ucMenu_l" tagprefix="uc1" %>
<%@ Register src="../Controls/admin/ucLeftmenu_l.ascx" tagname="ucLeftmenu_l" tagprefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Menu" Runat="Server">

    <uc1:ucMenu_l ID="ucMenu_l1" runat="server" />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CP_left_menu" Runat="Server">
    <uc2:ucLeftmenu_l ID="ucLeftmenu_l1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ad_main" Runat="Server">
    <div class="breadcrumb">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Trangchu.aspx">Trang chủ</asp:HyperLink>
        <span class="active_breadcrumb">
            <asp:Label ID="lblienKet" runat="server" Text="Lớp Học"></asp:Label>
        </span>
    </div>
    <div class="nav_tabs">
        <ul>
            <li>
                <asp:HyperLink ID="linkqlkh" NavigateUrl="~/Admin/Lophoc.aspx" runat="server">Duyệt Lớp</asp:HyperLink>
            </li>
            <li>
                <asp:HyperLink ID="linkthemkh" NavigateUrl="~/Admin/Xemlop.aspx?update=0" runat="server">Thêm Lớp</asp:HyperLink>
            </li>
            <li class="active_tabs">
                <asp:HyperLink ID="linktimkh" NavigateUrl="~/Admin/Timkiemlop.aspx" runat="server">Tìm Kiếm Lớp</asp:HyperLink>
            </li>
        </ul>
        <div class="tab_description">Bạn có thể tìm kiếm các lớp trong hệ thống. Nhập vào một trong các điều kiện: Mã lớp, tên lớp.<br />
        Nhập nhiều điều kiện để tìm kiếm chính xác hơn.</div>
    </div>
    <asp:Panel ID="pnError" runat="server">
        <div class="error">
            <asp:Label ID="lblError" runat="server" />
        </div>
    </asp:Panel>
    <asp:Panel ID="pnSuccess" runat="server">
        <div class="thanhcong">
            <asp:Label ID="lblSuccess" runat="server" />
        </div> 
    </asp:Panel>
    
     <div class="border_wrapper">
        <div class="title">Điều kiện tìm kiếm</div>
 
        <table class="general" cellspacing="0" width="100%">        
            <tbody>
                <tr>
                    <td width="50%">
                        <label>Mã Lớp</label>
                        <div class="inputs">
                            <asp:TextBox ID="txttimml" CssClass="select" runat="server"></asp:TextBox>
                        </div>
                    </td>
                    <td width="50%">
                        <label>Tên Lớp</label>
                        <div class="inputs">
                            <asp:TextBox ID="txttimtl" CssClass="select" runat="server"></asp:TextBox>
                        </div>
                    </td>
                </tr> 
                <%--<tr class="table-row">
                    <td width="50%">
                        <label>Địa chỉ Email</label>
                        <div class="inputs">
                            <asp:TextBox ID="txttimemail" CssClass="input_text" runat="server"></asp:TextBox>
                        </div>
                    </td>
                    <td width="50%">
                        <label>Địa chỉ</label>
                        <div class="inputs">
                            <asp:TextBox ID="txttimdiachi" CssClass="input_text" runat="server"></asp:TextBox>
                        </div>
                    </td>
                </tr>--%>
            </tbody>
        </table>
         <asp:Literal ID="ltrdiv" runat="server"></asp:Literal>
        <asp:GridView ID="gvlop" runat="server" AllowPaging="True" 
            AutoGenerateColumns="False" CssClass="general" PageSize="5" Width="100%">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Button ID="btnxoal" runat="server" Text="Xóa" onclick="btnxoal_Click" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chklop" runat="server" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="id" HeaderText="ID">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Mã Lớp">
                    <ItemTemplate>
                        <asp:HyperLink ID="linktkl" runat="server" 
                            NavigateUrl='<%# "Xemlop.aspx?cid="+Eval("id")+"&update=-1" %>' 
                            Text='<%# Eval("classid") %>'></asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="name" HeaderText="Tên Lớp">
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="amout" HeaderText="Giới Hạn">
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="classtype" HeaderText="Loại Lớp">
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Trạng Thái">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" 
                            Text='<%# CheckTrangThai(Eval("status")) %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Hành Động">
                    <ItemTemplate>
                        <asp:HyperLink ID="linksuakh" runat="server" ImageUrl="~/images/admin/edit.png" 
                            NavigateUrl='<%# "Xemlop.aspx?cid="+Eval("id")+"&update=1" %>'></asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="button_wrapper">
        <asp:Button ID="btncapnhatl" CssClass="submit_button" runat="server" 
            Text="Tìm kiếm" onclick="btncapnhatl_Click" />
    </div>
</asp:Content>

